package com.tj.collection.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/3/29
 * Time: 下午2:44
 */
public enum ExtensionStatusEnum {
    UN_EXTENSION(0, "未展期"),
    WAITING_EXTENSION_REPAY(1, "提交展期&未支付"),
    EXTENSION_COMPLETE(2, "展期成功"),
    ;

    private Integer status;
    private String desc;

    ExtensionStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public ExtensionStatusEnum setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public ExtensionStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static ExtensionStatusEnum getEnum(Integer status) {
        for (ExtensionStatusEnum enums : ExtensionStatusEnum.values()) {
            if (enums.getStatus().equals(status)) {
                return enums;
            }
        }
        return null;
    }
}
